'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url admin/system/user/sys/disableUser 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid, status, _id } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------

    // 业务逻辑开始-----------------------------------------------------------
    if (vk.pubfn.isNullOne(_id)) {
    	return { code: -1, msg: '_id不能为空' };
    }
    if (uid === _id) {
    	return { code: -1, msg: '不能操作当前登录账户!' };
    }
    
    await vk.baseDao.updateById({
    	dbName: "uni-id-users",
    	id: _id,
    	dataJson: {
        status
      },
    });
    


		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
